<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@page import="java.util.List"%>
<%@page import="org.json.simple.JSONArray"%>
<%@page import="org.json.simple.JSONObject"%>

<%@page import="com.eleventwelve.iris.core.bean.JSONKeyObject"%>
  
<%
	/*
		[ { key: "", data: {} }, { key: "", data: {} }, ... ]
	*/
	JSONArray Jsresults=new JSONArray();
	List<JSONKeyObject> results = (List<JSONKeyObject>) request.getAttribute("results");
	
	for (JSONKeyObject record:results) {
		Jsresults.add(record.toJSONObject());
	}	
	out.print(Jsresults);
    out.flush();
%>